ProForth

Download an Apple II disk image of ProForth (.tgz).

Download the ProForth disk image as a ShrinkIt disk archive (.sdk).

ProForth glossary (.txt).

ProForth source code (.txt).

W. F. Ragsdale's original FIG Forth (.pdf) [22 MB].

ProForth: FIG Forth for ProDOS.

ProForth was adapted for ProDOS from FIG Forth in the mid-eighties. To explore the language, just boot the ProForth disk or run F.SYSTEM from your favorite program selector. Press return, and you should see an OK prompt. Here's a few tips to get started.

Check out Leo Brodie's book Starting Forth, cited below. Review the glossary to see the words in this version. The vlist command will print a short summary of known words.

You can examine the sample code using the list command. For example, the command 1 list will list the code on screen one, etc. Screens four and five hold system messages. Screen seven has a familar Hello, world program.

To load code and make it part of the ProForth dictionary, use the command n load, where n is the screen you want to load. For example, "1 load" adds words to save the dictionary to disk. Once they are loaded, the commands to save the newly extended dictionary to disk are on screen six. The command 6 load will save the new dictionary, overwriting your existing copy. You might want to work with a backup.

The bye command exits ProForth and returns to your program selector.

ProForth: Editing.

ProForth stores data on disk in a series of 1024 byte screens in the file F.DISK. To edit this file, run the program F.EDIT from your program selector. On starting, the editor displays block one.

Here's a summary of the editor's commands (^ means a control key):

Arrow keys move the cursor; typing enters text.

esc - exit the editor.

^s - save the current screen to disk.

^i - (tab) brings up the next screen for editing.

^p - moves to the previous screen.

del - delete the character to the left of the cursor.

^d - delete the character under the cursor.

^y - deletes everything to the end of the line.

^x - cut the curent line to the buffer, moving other lines up.

^c - copy the current line to the buffer.

^v - paste the buffer before the current line, moving other lines down.

^r - replace the current line with the one in the buffer.

^e - toggle editing between insert and overwrite mode.

Cut, copy, paste and replace work between screens, too.

ProForth: Dictionary Additions.

A few new words words were added to the basic FIG Forth vocabulary:

MON --

Enter the machine language monitor; control-Y resumes ProForth.


MLI addr n1 -- n2

Call the ProDOS MLI with parameter list at addr and command n1; n2 is

ProDOS return error.


CALL addr --

Call machine language program at address addr; A, X and Y are passed in

zero page locations 0, 1 and 2, respectively.


BYE --

Exit via ProDOS MLI command ($65).


CLOSE --

Close the file identified by the reference number in byte 2 of CLIST.


OPEN --

Open the file whose full or partial pathname follows. If this file

contains Forth screens, they will be numbered from OFFSET (100 by

default). The DR1 command will cause them to be numbered from 0.


SAVE --

Save the dictionary from $800 to HERE. See screen 5, for example.

ProForth: Suggested Reading.

Starting Forth by Leo Brodie.

Forth interest web sites.

Copyright 1986,2005 John B. Matthews

Distribution permitted under the terms of the GNU Public License.

Last updated 08-Sep-2010